﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DZH.TextSearch.Web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>智慧搜索</title>
    <script src="js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link href="css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="nav">
        欢迎您：毕海 先生 | <a href="http://www.gw.com.cn">返回大智慧首页</a>
    </div>
    <div id="logo">
        <img src="img/logo.png" alt="大智慧" />
    </div>
    <div id="search">
        <asp:DropDownList runat="server" ID="cboCategory">
            <asp:ListItem Value="0" Selected="True">全部</asp:ListItem>
            <asp:ListItem Value="1">新闻</asp:ListItem>
            <asp:ListItem Value="11,12">微博</asp:ListItem>
            <asp:ListItem Value="3">公告</asp:ListItem>
            <asp:ListItem Value="6">研报</asp:ListItem>
        </asp:DropDownList>
        <asp:TextBox ID="tbxSearch" runat="server"></asp:TextBox>
        <asp:Button ID="btnOK" runat="server" Text="智慧搜索" />
    </div>
    <div id="list">
        <div>
            <div class="list_title">我的自选股</div>
            <div class="list_content"><a href="#">招商银行</a>&nbsp;&nbsp;<a href="#">华丽家族</a>&nbsp;&nbsp;<a href="#">新乡化纤</a>&nbsp;&nbsp;<a href="#">比亚迪</a>&nbsp;&nbsp;<a href="#">江淮汽车</a>&nbsp;&nbsp;<a href="#">鹏博士</a></div>        
        </div>
    </div>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {

        $("div.list_content").children().each(function (item) {
            $(this).attr("href", "./Search.aspx?key=" + $(this).text() + "&c2=0");
        });

        $("#btnOK").click(function () {
            var key = $.trim($("#tbxSearch").val());
            if (key == "") {
                $("#tbxSearch").focus();
                return false;
            }

            var c2 = $("#cboCategory").val();
            var key = $.trim($("#tbxSearch").val());

            document.location = "./Search.aspx?key=" + key + "&c2=" + c2;

            return false;
        });
    });
</script>